package com.xcl.mapper;

import com.xcl.pojo.OutsourcingCost;
import com.zzg.entity.Finance;
import com.zzg.entity.Outsourcing;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @ClassName OutsourcingCostMapper
 * @Description 外包费用数据访问层
 * @Author: xiaochaolei
 * @date 2021/7/23 16:15
 * @Version 1. 0
 */
@Mapper
public interface OutsourcingCostMapper {
    /**
     * 得到所以外包费用集合
     * @return list集合类型的外包费用
     */
    public List<OutsourcingCost> getAllOutsourcingCost();

    /**
     * 分页查询外包费用
     * @param page 页码数
     * @param limit 条目数
     * @param outsourcingOrder 外包单号
     * @param waybill_id 运单号
     * @param eeforwardingUnit 收货单位
     * @param forwardingUnit 发货单位
     * @param date 转包日期
     * @param type 外包类型
     * @param loname 承包单位
     * @param city 出发地
     * @return 集合类型的外包费用
     */
    public List<OutsourcingCost> getAllOutsourcingCostByLimit(
            @Param(value = "page") int page,
            @Param(value = "limit") int limit,
            @Param(value = "outsourcingOrder") String outsourcingOrder,
            @Param(value = "waybill_id") String waybill_id,
            @Param(value = "eeforwardingUnit") String eeforwardingUnit,
            @Param(value = "forwardingUnit") String forwardingUnit,
            @Param(value = "date") String date,
            @Param(value = "type") String type,
            @Param(value = "loname") String loname,
            @Param(value = "city") String city
    );

    /**
     * 根据外包单号得到外包信息
     * @param outsourcingorder 外包单号
     * @return 外包信息
     */
    public Outsourcing getOutsourcingByOutsourcingorder(@Param(value = "outsourcingorder") String outsourcingorder);

    /**
     * 根据外包单号查询财务信息
     * @param outsourcingId 外包单号
     * @return 财务信息
     */
    public Finance getFinanceOutsourcingId(@Param(value = "outsourcingId") String outsourcingId);

    /**
     * 修改财务详细信息
     * @param costBreakdown_id 财务详细信息
     * @return  影响行数
     */
    public int updateCostBreakdown(@Param(value = "costBreakdown_id") String costBreakdown_id);
}
